package ferp.center.server.servlet;

import ferp.center.server.Action;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * User: olegs
 * Date: 10/2/13 3:57 PM
 */
public class SocialPost extends HttpServlet
{
  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
  {
    char[] buffer = new char[request.getContentLength()];

    request.getReader().read(buffer);
    Action.logger().info(new String(buffer));
  }

  protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
  {
    doPost(request, response);
  }
}
